<template>
  <div class="login">
    <p>账号:<input type="text" v-model="params.account" /></p>

    <p>密码:<input type="text" v-model="params.pwd" /></p>

    <button @click="loginClick">登录</button>
  </div>
</template>

<script>
export default {
  data: () => ({
    params: {
      account: "",
      pwd: "",
    },
  }),
  methods: {
    async loginClick() {
      await this.$store.dispatch("loginUser/login");
      this.$router.push("/");
    },
  },
};
</script>

<style scoped>
</style>
